<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录页</title>
    <!-- 导入css文件 -->
    <link rel="stylesheet" href="../static/css/bootstrap.min.css">
    <link rel="stylesheet" href="../static/css/login.css">
    <!-- 导入浏览器图标 -->
    <link rel="shortcut icon" href="../static/imgs/icecream.ico">
</head>

<body class="text-center">
    <div class="card" style="width: 30rem;">
        <div class="card-body">
            <form>
                <div class="form-group">
                    <img class="mb-4" src="../static/imgs/avatar.jpg" alt="" width="60px" height="60px"
                        style="border-radius: 50px;" style="border-radius: 50px;">
                    <!-- <label for="exampleInputEmail1">Email address</label> -->
                    <input type="email" class="form-control" id="inputEmail1" placeholder="账号"
                        aria-describedby="emailHelp">

                </div>
                <div class="form-group">
                    <!-- <label for="exampleInputPassword1">Password</label> -->
                    <input type="password" class="form-control" placeholder="密码" id="inputPassword1">
                </div>
                <p class="fg">
                    <input type="checkbox" value="remeber-me"> 自动登录
                    &nbsp;
                    <input type="checkbox" value="remeber-me"> 记住密码
                    &nbsp;
                    <a href="">找回密码</a>
                </p>
                <button class="btn btn-lg btn-primary btn-block" type="button" onclick="login()">登录</button>
                <div id="registeruser">
                    <a class="register" href="./register.html">注册账号</a>
                </div>
                
            </form>
        </div>
    </div>
    <script src="">
        function login(){
            //获取用户名
            let username = $('#inputEmail1').val();
            //获取密码
            let password = $('#inputPassword1').val();
            //登录判断用户名和密码是否为空
            if(username === ''){
                alert('账号不能为空，请检查后重试！');
            }else if(password === ''){
                alert('密码不能为空，请检查后重试！');
            }else{
                //跳转主页面
                window.location.href = '/index.html';
            }
        }
    </script>
    <script src="../static/js/jquery-3.6.0.min.js"></script>
    <script src="../static/js/bootstrap.min.js"></script>
</body>

</html>